Nonlinear Filtering Techniques Comparison for Battery State Estimation

Original scientific paper

Journal of Sustainable Development of Energy, Water and Environment Systems
Volume 2, Issue 3, September 2014, pp 259-269
DOI: https://doi.org/10.13044/j.sdewes.2014.02.0021
Aspasia Papazoglou, Stefano Longo , Daniel Auger, Francis Assadian
Centre for Automotive Engineering, Cranfield University, Bedfordshire, UK

Abstract

The performance of estimation algorithms is vital for the correct functioning of batteries in electric vehicles, as poor estimates will inevitably jeopardize the operations that rely on un-measurable quantities, such as State of Charge and State of Health. This paper compares the performance of three nonlinear estimation algorithms: the Extended Kalman Filter, the Unscented Kalman Filter and the Particle Filter, where a lithium-ion cell model is considered. The effectiveness of these algorithms is measured by their ability to produce accurate estimates against their computational complexity in terms of number of operations and execution time required. The trade-offs between estimators' performance and their computational complexity are analyzed.

Keywords: Battery-management system, Estimation algorithms, Lithium-ion cells, State of Health, Computational complexity

Creative Commons License
Views (in 2025): 294 | Downloads (in 2025): 77
Total views: 6739 | Total downloads: 3770
INTRODUCTION

Accurate battery estimation algorithms are considered to be of great importance due to their applications in electrified transportation and energy storage systems. Battery systems constitute the core source of energy for electrified vehicles hence their safe and reliable operation has to be ensured. Their degradation over time and the limited amount of information related to their internal state justifies the need of controlling batteries by advanced estimation algorithms.

Battery-management systems (BMSs) are embedded computers that have the ability to execute real time algorithms in order to estimate, control and communicate with other components. Implemented into Electric Vehicles (EVs), BMSs manage the battery by monitoring its state, protecting the battery and controlling its environment [1]. Estimating battery's state provides information that is essential for obtaining critical variables such as the State of Health (SoH) and State of Charge (SoC) of the battery. The estimated state of the battery determines the control actions that will be taken by the BMS and enables a more aggressive utilization of the battery, while ensuring its safe and reliable operation [2].

Over the past decades, different versions of battery models have been applied in combination with a number of estimation algorithms. The first category includes equivalent circuit models (ECMs), which consider the battery as if it was an electrical network. The majority of battery models are based on ECMs as they represent complex relationships in a simplified way, aiding the calculations and the analysis. Methods for estimating states and parameters based on ECMs by using the Extended Kalman Filter (EKF) [3] and the Sigma-point (or Unscented) Kalman Filter (UKF) have been proposed [4]. An adaptive unscented Kalman filter based on an ECM to develop an online estimation of the SoC of EV's battery has also been proposed [2]. Other approaches include a nonlinear ECM to estimate the SoC of the battery model by applying the Particle Filter (PF) [5] and the use of ECMs to compare the effectiveness of EKF and PF based on state estimations [6].

The second category consists of the electrochemical models, battery models that are represented by partial differential equations and provide an explanation of the fundamental physics of the batteries. Electrochemical principles to model a Lithium-ion (Li-ion) battery with a reduced-order model are used in [7]. In [8], the same authors, based on the analytical expressions of a Li-ion battery, present a simpler electrochemical model, which is used to design an observer. The performance and effectiveness of the PF to specific algorithms in an electrochemical model is presented in [9]. Such modeling method is complicated, as it is difficult to obtain model's parameters and it is not computationally suitable for online estimation.

This paper considers Li-ion batteries, which are recognised as the most promising technology [8]. Except from belonging among the batteries with the best energy-to-weight ratios, they have the privilege of lacking memory effect and when they are not in use their self-discharge rate is low. Additionally, their decreasing cost enlists them as a leading candidate for the next automotive generation [7]. The battery model that is chosen to represent the Li-ion battery belongs to the ECMs category and is known as Thevenin model. The estimation algorithms that have been compared here to estimate the states of the Li-ion battery are the EKF, UKF and PF. The algorithm's accuracy is tightly coupled with its computational complexity. Unfortunately, the complexity that characterizes each algorithm increases with its accuracy, making the choice of the estimation technique more challenging.

The aim of this paper is to analyze the complexity of the EKF, UKF and PF based on their number of operations and the execution time (i.e. their computational effort). The trade-off between estimators' performance and computational complexity is shown. This could be used for the selection of the most appropriate estimation technique for a particular application.

LITHIUM-ION CELL MODEL

ECMs have been widely used in different type of modeling and simulation for EVs and BMSs. They are based on the dynamic characteristics and working principles of batteries and they use capacitors, resistances and voltage sources to compose circuit networks. The battery cell model that is used in this paper is a discrete-time, nonlinear model, based on the Thevenin circuit. The Thevenin model consists of a parallel RC network connected in series, which includes a polarization resistance RTh and an equivalent capacitance CTh. Symbol Ro represents an ohmic resistance and UL is the terminal voltage. IL is the current (positive for charging, negative for discharging) and Uoc is an ideal voltage source, chosen to represent an open-circuit voltage [10]. The schematic diagram of the circuit is illustrated in Figure 1.

Thevenin model

The cell model can be presented by the nonlinear set of state space equations:

xk=f(xk1,uk1,wk1,k1) yk=h(xk,uk,vk,k)

where, in our case, xk = [SoH SoC UTh Temperature]T is the state vector, yk = UL is the output of the system, uk = IL is the current input to the system, wk is the process noise (zero-mean Gaussian), vk is the measurement noise (zero-mean Gaussian). The nonlinear function f is given by the relationship:

SoHk=SoHk1|ILk|2LT3600Qcell SoCk=SoCk1ILk3600Qcell UThk=UThk1RThCTh+ILk1CTh

The temperature T is assumed, at this stage, to be constant. Although the estimation algorithms used in the paper focus on state estimation, temperature is in this case a parameter and it is included in the state vector so that an estimate can be readily obtained. Symbols LT, Qcell and CTh, which represent the lifetime, the capacity and the capacitance of the cell, respectively, are constant values. Further details regarding equation (3) are included in [16]. The nonlinear measurement function h is given by:

ULk=UThkILkRo+Uoc

Resistances Ro, RTh and the Open Circuit Voltage (OCV) are considered to be parameters and are functions of the SoH, SoC, current, temperature and charge/discharge conditions. They are obtained from experimental results and the procedure to determine them is based on offline methods and explained in [15].

ESTIMATION ALGORITHMS

Estimation algorithms are mathematical techniques used to compute the optimal estimates of states and parameters of a dynamical system [11]. In this paper, they are used to estimate the states of the Li-ion battery cell, which cannot be directly measured. The EKF, UKF and PF are considered here. The algorithms are presented in sequential stages. At each stage, the number of operations (additions, subtractions, multiplications, divisions and square roots) required is determined. This is given as a function of the number of states n, the number of inputs m and the number of outputs p.

Extended Kalman Filter

In the EKF, the nonlinear dynamical system is linearized at every time step by a first-order Taylor-series expansion approximation. The linearized system is then used to compute the estimation of the states and the error covariance matrices [11], [12]. A summary of the algorithm is presented in Table 1. (Notice that in the table, the superscript '-' indicates an estimate at time k without the information about the prediction at time k. The superscript '+' indicates an estimate at time k given the information about the prediction at k.)

Summary of the Extended Kalman Filter

Stages Computations required Number of FLOPs
Initialization
For k = 0 setInitial state estimation x^o+ -
Initial error covariance matrixFor k = 1, 2,… compute: Po+ -
Linearized matrices A^k, B^k, C^k, D^k A^k=f(xk,uk,wk,k)xk|xk=x^k+ B^k=f(xk,uk,wk,k)wk|wk=w~k C^k=h(xk,uk,wk,k)xk|xk=xk^ D^k=h(xk,uk,wk,k)vk|vk=v~k Derived analytically
Main loop
State estimate time update x^k=f(x^k1+,uk1,w~k1,k1) 40n2+1740n
Error covariance time update Pk=Ak1+Σx~,k1+Ak1T+Σw 2n(n2+n+1)+98+mn(4m+4n+3)
Output estimate y^k=Ckx^k+Dkuk 492n
Estimator gain matrix Kk=x˜,kCkT[ Ckx˜,kCkT+Σv ]1 pn(2n+3p1)+120+p(n1)(2n+p)+p
State estimate measurement update x^k+=x^k+Lk(yky^k) p(2n-1)
Error covariance measurement update Pk+=(ILkCk)Σx~,k n3 + 2n2

The EKF is easy to implement in terms of complexity, especially when the linearized system matrices (Jacobians) can be computed analytically. Its simplicity makes it a tempting choice among the variety of nonlinear estimation algorithms. However, the EKF's performance deteriorates when models are highly nonlinear. The UKF, on the other hand, can better deal with harsh nonlinearities.

Unscented Kalman Filter

The filters that belong to the Kalman Filter category attempt to propagate the mean and the covariance values of a system using the methods of time update and measurements update [13]. According to this, when systems under consideration are highly nonlinear, the method of linearization based on the EKF does not seem to be the ideal solution. The UKF determines a set of sigma points and transforms them nonlinearly to a new set of points. Due to this, the mean and covariance value of the sigma points matches the mean and covariance value of the estimated value. The states of the system and the covariance matrices are computed based on those sigma points [14]. A summary of the UKF algorithm is presented in Table 2.

Summary of the Unscented Kalman Filter

Stages Computations required Number of FLOPs
Initialization
For k = 0 set
Initial state estimation x^o+ -
Initial error covariance matrix Po+ -
Main loop
For k = 1,2,… compute:
State estimate time update xk1(i)=x^k1++x~(i) xk(i)=f(xk1(i),uk1,wk1,k1) x^k=12ni=12nxk(i) n33+3n2 40n2+1740n 2n2
Error covariance time update Pk=12ni=12n(xk(i)x^k)(xk(i)x^k)T+Qk 4n3+6n2+98+2(m+n+1)(mn+n)
Output estimate yk(i)=h(xk(i),uk,vk,k) y^k=12ni=12nyk(i) 492n 2np
Estimator gain matrix Py=12ni=12n(yk(i)y^k)(yk(i)y^k)T+Rk Pxy=12ni=12n(xk(i)x^k)(yk(i)y^k)T Kk=PxyPy1 4n(p2+p)+p2 np(4n+3)+2n2+n+p 2p2npn
State estimate measurement update x^k+=x^k+Kk(yky^k) 2pnn+p
Error covariance measurement update Pk+=PkKkPyKkT pn(2p+2n1)
Particle Filter

Both the EKF and UKF work under the assumption of a Gaussian posterior, limiting the range of their applications and characterizing them as inappropriate for non-Gaussian dynamical systems [5], [17]. The PF algorithm (presented in Table 3) uses on a different philosophy. Being part of the sequential Monte Carlo methods, the PF estimate states and parameters of a nonlinear dynamical system using a number of sample points based on Bayesian estimators [9].

Summary of the Particle Filter

Stages Computations required Number of FLOPs
Initialization
For k = 0 and I = 1,..,N
Generation of N initial randomly particles xo,i+ 3Nn
Main loop
For k = 1, 2,… compute:
A priori N particles xk,i=fk1(xk1,i+,uk1,wk1i) N (43n2 +1739n)
Importance weights qk,i=p(ykxk,i) N (2 p2 + p + 498n)
Normalization of the weights qk,i=qk,ij=1Nqk,j Np
A posterior N particles xk,i+ different resampling techniques used 2N-1
Statistical measurements mean (xk,i+) or covariance (xk,i+) n(N +1)
ESTIMATION ALGORITHMS COMPARISON

The description of the estimation algorithms is followed by a comparison of the results of the estimated states. At this point, it should be noticed that the cell model used to simulate the ‧real' battery cell is also used within the estimation algorithms to compute the estimated values. This provides an advantage in the entire estimation procedure, as the estimators operate under ideal modeling conditions. However, in the model for the ‧real' battery, a Gaussian noise with variance equal to 4 is injected to the input and output signal.

The analysis of the algorithms' performance focuses on the estimated values of SoH, SoC, temperature and terminal voltage (see Figure 2). The sampling time was selected to be 1s, which is appropriate given the relatively slow dynamic response of the battery. Each graph contains the estimated values from the three filters (the PF is implemented for 100 particles).

Estimation results

As it can be seen in the plots, the SoC and voltage estimations seem to have a faster convergence rate than SoH and temperature, which also converge but at a slower rate. The reason may be that slowly changing states (as the SoH) and parameters (as the temperature in this case) are generally more difficult to track. Overall, the EKF appears to have a better performance and be more accurate when compared to the other filters.

However, at steady state, the EKF and the UKF converge to the same estimate. The superiority of the EKF towards UKF has to do with the type of nonlinearities that characterizes the cell model and the fact that the noise affecting the system is precisely known. The model for the Li-ion cell is only moderately nonlinear. The UKF approximates the Gaussian noise distribution rather than the model. With a mildly nonlinear model and known noise distribution it is not surprising that the EKF, which approximates the model instead of the noise distribution, performs better than the UKF. The PF seems to have higher accuracy, as far as SoC and voltage are concerned. The reduced performance in SoH and temperature estimation may be due again to the noise distribution. PFs perform better for non-Gaussian systems but the noise added to this particular model is Gaussian. Further work will include experiments with models corrupted by non-Gaussian noise.

Figure 3. shows the estimation errors for the EKF, the UKF and the PF. The estimation error is defined as the difference between the ‧real' value and the estimated one. The PF seems to have the lowest SoC and voltage estimation error followed by the EKF and the UKF. But overall the EKF seems to be more accurate for this particular case.

Estimation errors

COMPUTATIONAL COMPLEXITY ANALYSIS

The performance of the estimation algorithms is significant for the safe and efficient operation of the battery, hence accuracy is one of the most important criteria upon which the choice of the algorithm is based. However, accuracy and computational complexity are correlated and both of them have to be taken into account when evaluating the algorithms' performance. Computational complexity will be analyzed in terms of the number of operations performed in the algorithm and the corresponding execution time.

Number of operations

In order to determine the number of operations executed in the algorithms, a new measure will be introduced, the number of FLoating-point OPerations (FLOPs) [15]. The FLOPs are indicative of the complexity of each algorithm and constitute a measure of comparison.

Taking into account that every embedded computer has a different range of capabilities and that for a typical processor more than one step is needed to execute one operation, it is assumed that all the operations have the same weight and each operation (addition, subtraction, multiplication, division and square root) corresponds to one FLOP. Tables 1, 2 and 3 also show the number of FLOPs needed for each algorithm's step. Keeping as a constant the number of inputs m = 1 and the number of outputs p = 1 and varying the number of states (for example by adding more capacitors in the Thevenin model for higher accuracy) the graph in Figure 4 is presented.

Number of FLOPs for the EKF, UKF and PF

It can be seen that as the number of states increases, the number of FLOPs increases rapidly, especially for the PF. For n = 4, which is the number of states of the proposed cell model, the total number of FLOPs for the EKF is 10,217, for the UKF is 10,414 and for the PF is 964,603 (N = 100) and 1,929,203 (N = 200). It should be noted that the complexity of the PF, even for N = 100, is approximately two orders of magnitudes higher than the one of the EKF, making it challenging to use the PF for real time estimation.

It would be useful to be able to combine the time needed to execute an algorithm with the number of FLOPs that this algorithm needs. There are a variety of processors with different capabilities and an example of a common processor will be used in order to understand how FLOPs relate to time. Assuming that a processor has a clock frequency of 80 MHz and that it executes one FLOP per clock cycle, then the processor has a theoretical performance of 80,000.000 FLOPs/second, and the actual computational time for an algorithm can be easily calculated.

Execution time

The analysis presented earlier (FLOP counting) is theoretical and only gives an indication of the algorithms' complexity. In practice, the actual execution time is needed, and this can often only be obtained experimentally. Hence, the actual execution time of the three filters was measured experimentally and presented in Table 4. The computation was performed on a desktop PC with a 2.1 GHz CPU, 4 GB of RAM and running MATLAB's version 7.12.0 (R2011a).

Experimental computational time of EKF, UKF and PF

EKF UKF PF
Time for one iteration (s) 0.0017 0.0041 0.0599
Proportion of execution time 1x 2.4x 35.2x

The execution time for the UKF and the execution time for the PF are 2.4 and 35.2 times longer than the one for the EKF, respectively. The time difference between the PF and the other two algorithms is very large, considering that these estimations should be executed online and within a typical sampling interval of 1s. This result confirms the high complexity of the PF's that was predicted, theoretically, by counting the number of FLOPs.

CONCLUSION

This paper compared the performance of three algorithms for state estimation of a nonlinear Li-ion battery cell model. The comparison was done in terms of the estimates accuracy and the computational complexity required. The nonlinear cell model was based on an equivalent Thevenin circuit. The states estimated were SoH, SoC, voltage and temperature. Results showed that the EKF, although based on an approximation of the nonlinear dynamics, was generally more accurate than the UKF and PF. This was probably due to the fact that the UKF, which is based on an approximation of the noise distribution rather than process dynamics, performs better for highly nonlinear systems and the cell model considered was only mildly nonlinear. The performance of the PF was unsatisfactory regarding the SoH and temperature estimations. This has to be attributed to the fact that the PF outperforms the other algorithms when the system is corrupted by non-Gaussian noise (while simulations were performed only with Gaussian noise). The computational complexity of the PF is up to two orders of magnitudes higher than the other two methods and its practical applicability would be difficult to justify for the model used here. In order to fully understand the capabilities and limitations of the algorithms considered, test should be done with complex nonlinear models corrupted by non-Gaussian noise. This will be subject of future research.

REFERENCES
  1. Yinjiao X., Kwok M., Eden W., Pecht M., Battery Management Systems in Electric and Hybrid Vehicles, Energies, 1840-18572011, https://doi.org/10.3390/en4111840
  2. Fengchun S., Yuan Z., Siguang L., Adaptive Unscented Kalman Filtering for State of Charge Estimation of a Lithium-ion Battery for Electric Vehicles, Energy, Vol. Vol. 36 , :3531-35402011, https://doi.org/10.1016/j.energy.2011.03.059
  3. Plett G., Sigma-point Kalman Filtering for Battery Management Systems of LiPB-based HEV Battery Packs Part 1: Introduction and State Estimation, Journal of Power Sources, Vol. Vol. 161 , :1356-13682006, https://doi.org/10.1016/j.jpowsour.2006.06.003
  4. Plett G., Extended Kalman Filtering for Battery Management Systems of LiPB-based HEV Battery Packs Part 2: Modeling and Identification, Journal of Power Sources, Vol. Vol. 134 , :262-2762004, https://doi.org/10.1016/j.jpowsour.2004.02.032
  5. Gao M., Liu Y., He Z., Battery State of Charge online Estimation based on Particle Filter, 4th International Congress on Image and Signal Processing, 2011, https://doi.org/10.1109/CISP.2011.6100603
  6. Restaino R., Zamboni W., Comparing Particle Filter and Extended Kalman Filter for Battery State-Of-Charge Estimation, 38th Annual Conference on IEEE Industrial Electronics Society, 2012, https://doi.org/10.1109/IECON.2012.6389247
  7. Chaturvedi N., Klein R., Christensen J., Ahmed J., Kojic A., Algorithms for Advanced Battery-Management Systems, IEEE Control systems magazine, 49-682010, https://doi.org/10.1109/MCS.2010.936293
  8. Klein R., Chaturvedi N., Christensen J., Ahmed J., Findeisen R., Kojic A., Electrochemical Model Based Observer Design for a Lithium-Ion Battery, IEEE Transactions on Control Systems Technology, 2012, https://doi.org/10.1109/TCST.2011.2178604
  9. Samadi M., Mahdi Alavi A., Saif M., An Electrochemical Model-based Particle Filter Approach for Lithium-ion Battery Estimation, 51st IEEE Conference on Decision and Control, 2012, https://doi.org/10.1109/CDC.2012.6426009
  10. Hongwen H., Xiong R., Fan J., Evaluation of Lithium-Ion Battery Equivalent Circuit Models, Energies, Vol. Vol. 4 , :582-5982011, https://doi.org/10.3390/en4040582
  11. Chan D., A New Battery Model for use with Battery Energy Storage Systems and Electric Vehicles Power Systems, IEEE, 2000, https://doi.org/10.1109/PESW.2000.850009
  12. , Developing a Tilt Sensor System Using Rapid STM32 Blockset (Part 1 Design and Simulation),
  13. Simon D., , Optimal State Estimation, 2006, https://doi.org/10.1002/0470045345
  14. Wei H., Williard N., Chen C., Pecht M., State of Charge Estimation for Electric Vehicle Batteries using Unscented Kalamn Filter, Microelectronics Reliability, 2012, https://doi.org/10.1016/j.microrel.2012.11.010
  15. Antaloae C., Marco J., Assadian F., A Novel Method for the Parameterization of a Li-Ion Cel Model for EV/HEV Control Applicatons, IEEE Transactions on Vehicular Technology, 2012, https://doi.org/10.1109/TVT.2012.2212474
  16. Auger D., Groff M., Mohan G., Longo S., Assadian F., The impact of Battery Ageing on an EV Powertrain Optimisation, 8th Conference in Sustainable Development of Energy, Water and Environment Systems, 2013
  17. Schwunk S., Particle Filter for State of Charge and State of Health estimation for Lithium-ion Phosphate Batteries, Journal of Power Sources, Vol. Vol. 239 , :705-7102012, https://doi.org/10.1016/j.jpowsour.2012.10.058

DBG